<template>
  <div class="version-updating-view">
    <!-- 页面头部 -->
    <div class="page-header">
      <h1 class="page-title">
        <span class="icon">📋</span>
        版本更新记录
      </h1>
      <div class="breadcrumb">首页 / 系统信息 / 版本更新</div>
    </div>

    <!-- 版本时间线卡片 -->
    <div class="version-timeline-card">
      <div class="timeline-container">
        <!-- V1.0 -->
        <div class="timeline-item">
          <div class="timeline-marker">
            <div class="marker-dot primary"></div>
            <div class="marker-line"></div>
          </div>
          <div class="timeline-content">
            <div class="version-header">
              <div class="version-badge primary">V1.0</div>
              <div class="version-date">2024/04/12</div>
            </div>
            <div class="version-details">
              <div class="feature-item">
                <div class="feature-icon">🎯</div>
                <div class="feature-text">发布作品</div>
              </div>
            </div>
            <div class="health-tag">
              <span class="tag-icon">🏥</span>
              <span class="tag-text">基础版</span>
            </div>
          </div>
        </div>

        <!-- V2.0 -->
        <div class="timeline-item">
          <div class="timeline-marker">
            <div class="marker-dot secondary"></div>
            <div class="marker-line"></div>
          </div>
          <div class="timeline-content">
            <div class="version-header">
              <div class="version-badge secondary">V2.0</div>
              <div class="version-date">2024/04/20</div>
            </div>
            <div class="version-details">
              <div class="feature-item">
                <div class="feature-icon">🔍</div>
                <div class="feature-text">新增转诊配置管理模块</div>
              </div>
              <div class="feature-item">
                <div class="feature-icon">📱</div>
                <div class="feature-text">新增患者患者管理移动端</div>
              </div>
            </div>
            <div class="health-tag">
              <span class="tag-icon">⚕️</span>
              <span class="tag-text">功能增强版</span>
            </div>
          </div>
        </div>

        <!-- V3.0 -->
        <div class="timeline-item">
          <div class="timeline-marker">
            <div class="marker-dot tertiary"></div>
            <div class="marker-line"></div>
          </div>
          <div class="timeline-content">
            <div class="version-header">
              <div class="version-badge tertiary">V3.0</div>
              <div class="version-date">2024/05/02</div>
            </div>
            <div class="version-details">
              <div class="feature-item">
                <div class="feature-icon">👩⚕️</div>
                <div class="feature-text">新增医护管理移动端</div>
              </div>
            </div>
            <div class="health-tag">
              <span class="tag-icon">💉</span>
              <span class="tag-text">全面管理版</span>
            </div>
          </div>
        </div>

        <!-- V4.0 -->
        <div class="timeline-item">
          <div class="timeline-marker">
            <div class="marker-dot quaternary"></div>
          </div>
          <div class="timeline-content">
            <div class="version-header">
              <div class="version-badge quaternary">V4.0</div>
              <div class="version-date">2025/01/07</div>
            </div>
            <div class="version-details">
              <div class="feature-item">
                <div class="feature-icon">📊</div>
                <div class="feature-text">新增运营决策相关内容</div>
              </div>
            </div>
            <div class="health-tag">
              <span class="tag-icon">📈</span>
              <span class="tag-text">智能分析版</span>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 系统版本概览 -->
    <div class="version-overview-card">
      <h3 class="section-title">
        <span class="section-icon">📊</span>
        版本发展概览
      </h3>
      <div class="overview-content">
        <div class="stats-container">
          <div class="stat-item">
            <div class="stat-number">4</div>
            <div class="stat-label">主要版本</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">4</div>
            <div class="stat-label">新增功能模块</div>
          </div>
          <div class="stat-item">
            <div class="stat-number">9</div>
            <div class="stat-label">月更新周期</div>
          </div>
        </div>
        <div class="progress-container">
          <div class="progress-item">
            <div class="progress-label">功能完整性</div>
            <div class="progress-bar">
              <div class="progress-fill" style="width: 90%"></div>
            </div>
            <div class="progress-value">90%</div>
          </div>
          <div class="progress-item">
            <div class="progress-label">用户体验</div>
            <div class="progress-bar">
              <div class="progress-fill" style="width: 85%"></div>
            </div>
            <div class="progress-value">85%</div>
          </div>
          <div class="progress-item">
            <div class="progress-label">医疗专业性</div>
            <div class="progress-bar">
              <div class="progress-fill" style="width: 95%"></div>
            </div>
            <div class="progress-value">95%</div>
          </div>
        </div>
      </div>
    </div>

    <!-- 医疗功能演进 -->
    <div class="medical-evolution-card">
      <h3 class="section-title">
        <span class="section-icon">🏥</span>
        医疗功能演进
      </h3>
      <div class="evolution-grid">
        <div class="evolution-item">
          <div class="evolution-icon">🎯</div>
          <h4 class="evolution-title">基础医疗记录</h4>
          <p class="evolution-desc">建立标准化的患者健康档案管理体系</p>
        </div>
        <div class="evolution-item">
          <div class="evolution-icon">🔄</div>
          <h4 class="evolution-title">转诊协同系统</h4>
          <p class="evolution-desc">实现上下级医疗机构的无缝转诊流程</p>
        </div>
        <div class="evolution-item">
          <div class="evolution-icon">📱</div>
          <h4 class="evolution-title">移动医疗服务</h4>
          <p class="evolution-desc">医护人员与患者的移动化交互平台</p>
        </div>
        <div class="evolution-item">
          <div class="evolution-icon">🧠</div>
          <h4 class="evolution-title">智能决策支持</h4>
          <p class="evolution-desc">基于数据分析的医疗管理决策建议</p>
        </div>
      </div>
    </div>

    <!-- 底部信息 -->
    <div class="footer-section">
      <div class="footer-content">
        <div class="footer-logo">
          <i class="el-icon-medal"></i>
          <span>区域慢病管理系统</span>
        </div>
        <div class="footer-info">
          <p>最新版本：V4.0 (2025/01/07)</p>
          <p>建议更新至最新版本以获得最佳体验</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus'

// 页面加载时的欢迎消息
onMounted(() => {
  ElMessage.info('查看区域慢病管理系统版本更新记录')
})
</script>

<style scoped>
/* 全局样式 */
.version-updating-view {
  padding: 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  min-height: 100vh;
  font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 页面标题区域 */
.page-header {
  margin-bottom: 32px;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 700;
  color: #0369a1;
}

.page-title .icon {
  font-size: 36px;
}

.breadcrumb {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* 版本时间线卡片 */
.version-timeline-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.version-timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9, #0369a1);
}

/* 时间线容器 */
.timeline-container {
  position: relative;
  padding-left: 40px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* 时间线标记 */
.timeline-marker {
  position: absolute;
  left: -40px;
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marker-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.marker-dot.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.marker-dot.secondary {
  background: linear-gradient(135deg, #10b981, #059669);
}

.marker-dot.tertiary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.marker-dot.quaternary {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.marker-line {
  width: 2px;
  flex-grow: 1;
  background: #e2e8f0;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* 时间线内容 */
.timeline-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.12);
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.version-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 16px;
  color: white;
}

.version-badge.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.version-badge.secondary {
  background: linear-gradient(135deg, #10b981, #059669);
}

.version-badge.tertiary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.version-badge.quaternary {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.version-date {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.version-details {
  margin-bottom: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid #0ea5e9;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f9ff;
  border-radius: 50%;
}

.feature-text {
  font-size: 15px;
  color: #334155;
  font-weight: 500;
}

.health-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
}

.tag-icon {
  font-size: 16px;
}

/* 通用区域样式 */
.version-overview-card,
.medical-evolution-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0ea5e9;
}

.section-icon {
  font-size: 28px;
}

/* 版本概览样式 */
.overview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-item {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.12);
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 16px;
  color: #64748b;
  font-weight: 500;
}

.progress-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.progress-item {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
  color: #334155;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

.progress-value {
  font-size: 12px;
  color: #0369a1;
  font-weight: 600;
  text-align: right;
}

/* 医疗功能演进样式 */
.evolution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.evolution-item {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.evolution-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15);
}

.evolution-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.evolution-item:nth-child(2) .evolution-icon {
  animation-delay: 0.5s;
}

.evolution-item:nth-child(3) .evolution-icon {
  animation-delay: 1s;
}

.evolution-item:nth-child(4) .evolution-icon {
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.evolution-title {
  font-size: 18px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 8px;
}

.evolution-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* 底部样式 */
.footer-section {
  margin-top: 64px;
  padding: 32px;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  border-radius: 16px;
  color: white;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-logo i {
  font-size: 32px;
}

.footer-info p {
  margin: 4px 0;
  font-size: 14px;
  opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .version-updating-view {
    padding: 16px;
  }
  
  .page-header {
    padding: 20px 24px;
    margin-bottom: 24px;
  }
  
  .page-title {
    font-size: 28px;
  }
  
  .version-timeline-card,
  .version-overview-card,
  .medical-evolution-card {
    padding: 24px;
    margin-bottom: 24px;
  }
  
  .timeline-container {
    padding-left: 32px;
  }
  
  .timeline-marker {
    left: -32px;
    width: 32px;
  }
  
  .marker-dot {
    width: 20px;
    height: 20px;
  }
  
  .overview-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .evolution-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .footer-section {
    padding: 24px;
  }
}
</style>